package zua.program.androidstudioprogram01;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class EditInformationActivite extends AppCompatActivity {
    EditText username_edit_name,petName_edit_name;
    Button information_reset_password,save;

    //保存函数
    @Override
    protected void onSaveInstanceState(@NonNull Bundle outState) {
        super.onSaveInstanceState(outState);
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activite_edit_information);

        //将定义的值与其在xml中对应的id绑定
        username_edit_name = findViewById(R.id.username_edit_name);
        petName_edit_name = findViewById(R.id.petName_edit_name);
        information_reset_password = findViewById(R.id.information_reset_password);
        save = findViewById(R.id.save);

        information_reset_password.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent1 = new Intent(EditInformationActivite.this,ForgetPasswordActivity.class);
                startActivity(intent1);
            }
        });
        save.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent2 = new Intent(EditInformationActivite.this,QuestionActivity.class);
                startActivity(intent2);
            }
        });
    }
}
